#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <windows.h>
#include <time.h>
#include <stdbool.h>

#include "plane.h"
#include "debug.h"
void showPlaneInfo(Plane *plane) {
    if (plane == NULL) {
        printf("No plane information to display!\n");
        
        return;
    }

    printf("Flight Information:\n");
    printf("Flight Number: %s\n", plane->flightNumber);
    printf("Departure: %s\n", plane->departure);
    printf("Departure ID: %d\n", plane->depID);
    printf("Destination: %s\n", plane->destination);
    printf("Destination ID: %d\n", plane->desID);
    if(plane->departureTime.tm_year == 1900){
        printf("Departure Time: Unknown\n");
    }else{
        printf("Departure Time: %d-%d-%d %d:%d\n",
           plane->departureTime.tm_year + 1900,
           plane->departureTime.tm_mon,
           plane->departureTime.tm_mday,
           plane->departureTime.tm_hour,
           plane->departureTime.tm_min);
    }
    if(plane->arrivalTime.tm_year == 1900){
        printf("Arrival Time: Unknown\n");
    }else{
        printf("Arrival Time: %d-%d-%d %d:%d\n",
           plane->arrivalTime.tm_year + 1900,
           plane->arrivalTime.tm_mon,
           plane->arrivalTime.tm_mday,
           plane->arrivalTime.tm_hour,
           plane->arrivalTime.tm_min);
    }
    printf("Seat Count: %d\n", plane->seatNum);
}